using Demo.Models;
using Microsoft.EntityFrameworkCore;

namespace Demo.Db
{
    public class DemoDb : DbContext
    {
        private readonly string _sql = "server=.;database=MVCDemo1;uid=sa;pwd=123456;";
        public DbSet<ProductInfo> ProductInfo { get; set; }
        public DbSet<CategoryInfo> categoryInfo { get; set; }
        protected override void OnConfiguring(DbContextOptionsBuilder builder)
        {
            builder.UseSqlServer(_sql);
        }
    }
}